<?php

/**
 * 查询记录管理
 */

namespace app\ph\controller;

class Record extends Base
{
    protected $record_model;

    public function __construct()
    {
        parent::__construct();
        $this->record_model = new \app\common\model\Record();
    }

    /**
     * 列表功能
     * @return \think\response\View
     * @throws \think\exception\DbException
     */
    public function index()
    {
        $where  = [];
        $data = $this->record_model->getList($where, 'r.create_time,u.nick_name,r.user_id');
        $page = $data->render();
        $data = $data->items();
        return view('record/index',
            [
                'data'   => $data,
                'page'   => $page,
            ]
        );
    }
}
